package com.kh.samr.utils;

import com.alibaba.fastjson.JSONObject;
import com.hy.gs.itf.biz.RequestParams;
import com.hy.gs.itf.biz.http.HttpUtils;
import com.kh.samr.dto.DishonestyListDto;

import java.util.Date;
import java.util.List;

public class Demo {

	public static void main(String[] args) {

//		System.out.print(LawPerson());
		System.out.print(NaturalPerson());
		
	}

	/**
	 * 法人
	 *
	 * @return
	 */
	private static String LawPerson() {
		RequestParams requestParams = new RequestParams();
		requestParams.setContext("/kjLawList/kjLawBlackList");
		requestParams.setMethod(RequestParams.POST);
		
		requestParams.addParam("name", "天津塑力线缆集团有限公司");
		requestParams.addParam("uniscId", "91120113X008027320");
		requestParams.addParam("itemName", "KJJ01");
		requestParams.addParam("queryTime", new Date());
		requestParams.addParam("queryDepartment", "市科技局");
		String s = HttpUtils.sendRequest(requestParams);
		JSONObject jsonObject = JSONObject.parseObject(HttpUtils.sendRequest(requestParams));
		List<DishonestyListDto> dishonestyListDtoList = JSONObject.parseArray(jsonObject.get("data").toString(),
				DishonestyListDto.class);
		return HttpUtils.sendRequest(requestParams);

	}
	
	/**
	 * 自然人
	 *
	 * @return
	 */
	private static String NaturalPerson() {
		RequestParams requestParams = new RequestParams();
		requestParams.setContext("/kjLawList/kjNaturalPersonBlackList");
		requestParams.setMethod(RequestParams.POST);
		
		requestParams.addParam("name", "任凤奎");
		requestParams.addParam("idNumber", "120109197309253519");
		requestParams.addParam("itemName", "KJJ01");
		requestParams.addParam("queryTime", new Date());
		requestParams.addParam("queryDepartment", "市科技局");

		return HttpUtils.sendRequest(requestParams);

	}
	
}
